import service from "./service";

let link = (url:string, method:string = "get", data:any, params:any) => {
  return new Promise((resolve, reject) => {
    service.request({
      url,
      method,
      data,
      params
    }).then((ok) => resolve(ok)).catch((err) => reject(err))
  })
}

export default link